package com.xmut.xmutbackend.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 员工表
 * </p>
 */
@Data
@ApiModel(value = "Emp对象", description = "员工表")
public class Emp implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("ID")
    @ExcelProperty("员工ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户名")
    @ExcelProperty("用户名")
    private String username;

    @ApiModelProperty("密码")
    @ExcelIgnore // 密码不导出到 Excel
    private String password;

    @ApiModelProperty("姓名")
    @ExcelProperty("姓名")
    private String name;

    @ApiModelProperty("性别, 说明: 1 男, 2 女")
    @ExcelProperty("性别") // 导出为“男”“女”在 ExcelHandler 中转换
    private Integer gender;

    @ApiModelProperty("头像 URL")
    @ExcelProperty("头像链接")
    private String image;

    @ApiModelProperty("职位, 说明: 1 班主任,2 讲师, 3 学工主管, 4 教研主管, 5 咨询师")
    @ExcelProperty("职位")
    private Byte job;

    @ApiModelProperty("入职日期")
    @ExcelProperty("入职日期")
    private LocalDate entrydate;

    @ApiModelProperty("部门ID")
    @ExcelProperty("部门ID")
    private Integer deptId;

    @ApiModelProperty("创建时间")
    @ExcelIgnore // 不导出
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @ExcelIgnore // 不导出
    private LocalDateTime updateTime;
}
